<template>
	<view class="tab-item padding">
		<view class="left">
			<image class="img margin-right" :src="img" mode="aspectFill"></image>
			<view class="text">
				<view class="text-bold text-content flex align-center">
					<text class="text-cut">{{title}}</text>
					<text class="cu-tag bg-orange sm margin-left" v-if="level">{{level}}</text>
				</view>
				<view class="text-content" v-if="info">{{info}}</view>
				<view class="text-gray text-content">{{date}}</view>
			</view>
		</view>
		<view class="right">
			<view v-if="type==''" class="change text-bold text-content text-lg" :class="{ 'text-orange': change > 0 }">{{change > 0 ? '+' + change : change}}</view>
			<view v-if="type=='team'" class="change text-content text-cut">{{change}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			img: {
				type: String
			},
			title: {
				type: String
			},
			level: {
				type: String
			},
			info: {
				type: String
			},
			date: {
				type: String
			},
			change: {
				type: String
			},
			type: {
				type: String,
				default: ''
			}
		},
		data() {
			return {
				
			}
		}
	}
</script>

<style lang="scss" scoped>
	.bg-orange {
		background-color: #CDAF71;
	}
	.tab-item {
		display: flex;
		justify-content: space-between;
		.left {
			display: flex;
			.img {
				width: 70rpx;
				height: 70rpx;
				margin-top: 12rpx;
			}
		}
		.right {
			.text-orange {
				color: #CDAF71;
			}
		}
	}
</style>
